package it.softphone.commons.service.security.shiro;


import it.softphone.commons.service.security.SecurityAccountService;
import it.softphone.commons.service.security.SecurityAccountServiceFactory;

import java.security.GeneralSecurityException;

import org.apache.commons.configuration.Configuration;
import org.apache.shiro.web.servlet.ShiroFilter;

/**
 * 
 * @author softphone
 *
 */
@org.kohsuke.MetaInfServices
public class ShiroWebSecurityAccountServiceFactory extends SecurityAccountServiceFactory {

	static class MyFilter extends ShiroFilter {
		
	}
	
	public ShiroWebSecurityAccountServiceFactory() {
	}

	@Override
	public SecurityAccountService newSecurityAccountService(Configuration cfg) 	throws GeneralSecurityException {
        
        ShiroFilter filter = new MyFilter();
        
        return new ShiroSecurityAccountService( filter );
	}

}
